<template>
	<BaseFilter class="search-filter" :label="label">
		<u-row>
			<u-search :value="value" :show-action="false" shape="square" placeholder="请输入关键词" @input="onChange"
				@clear="(e) => onChange()" />
		</u-row>
	</BaseFilter>
</template>

<script>
	import BaseFilter from './BaseFilter.vue';

	export default {
		name: 'switchFilter',
		props: {
			label: {
				type: String
			},
			value: {
				type: String
			}
		},
		components: {
			BaseFilter
		},
		methods: {
			onChange(value) {
				this.$emit('input', value);
				this.$emit('change', value);
			}
		}
	}
</script>

<style>
</style>